//
//  ModelOfOtherData.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/7.
//  Copyright © 2016年 KX. All rights reserved.
//

#import "ModelOfOtherData.h"

@implementation ModelOfOtherData
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    NSMutableArray *arr1 = [NSMutableArray array];
    if ([key isEqualToString:@"id"]) {
        self.ID = [value integerValue];
    }if ([key isEqualToString:@"city_id"]) {
        self.city_id = [value integerValue];
    }if ([key isEqualToString:@"planto"]) {
        self.planto = [value integerValue];
    }if ([key isEqualToString:@"beento"]) {
        self.beento = [value integerValue];
    }if ([key isEqualToString:@"cateid"]) {
        self.cateid = [value integerValue];
    }if ([key isEqualToString:@"lat"]) {
        self.lat = [value integerValue];
    }if ([key isEqualToString:@"lng"]) {
        self.lng = [value integerValue];
    }if ([key isEqualToString:@"beentocounts"]) {
        self.beentocounts = [value integerValue];
    }if ([key isEqualToString:@"mapstatus"]) {
        self.mapstatus = [value integerValue];
    }if ([key isEqualToString:@"updatetime"]) {
        self.updatetime = [value integerValue];
    }if ([key isEqualToString:@"duration"]) {
        self.duration = [value integerValue];
    }if ([key isEqualToString:@"img_count"]) {
        self.img_count = [value integerValue];
    }if ([key isEqualToString:@"commentcounts"]) {
        self.commentcounts = [value integerValue];
    }if ([key isEqualToString:@"grade"]) {
        self.grade = [value integerValue];
    }if ([key isEqualToString:@"recommendnumber"]) {
        self.recommendnumber = [value integerValue];
    }if ([key isEqualToString:@"recommendscores"]) {
        self.recommendscores = [value integerValue];
    }if ([key isEqualToString:@"comment_list"]) {
        self.comment_list = [ModelOfOtherComment_list modelWithDic:value];
    }if ([key isEqualToString:@"discounts"]) {
        for (NSDictionary *dic in value) {
            ModelOfOtherComment_list *model = [ModelOfOtherComment_list modelWithDic:dic];
            [arr1 addObject:model];
        }
        self.discounts = arr1;
    }
}
@end
